package com.hmall.search.config;

import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author Saint.Martine
 * @since 2022/12/10 18:35
 */
@Configuration
public class SearchConfig {
    @Bean
    public RestHighLevelClient resclient(){
        return  new RestHighLevelClient(RestClient.builder(
                HttpHost.create("http://192.168.181.133:9200")
        ));
    }
}
